<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>洛璃的网站</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
        .box{
            width: 1000px;
            height: 400px;
            /* background-color: aqua; */
            margin: 315px auto 0;
        }
        .box li{
            position: relative;
            float: left;
            /* background-color: yellowgreen; */
            height: 100%;
        }
        .box li input:checked+.bg{
            opacity: 1;
        }
        .box li .bg{
            position: fixed;
            opacity: 0;
            /* 改变层级 */
            z-index: -1;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            transition: .3s;
            /* 滤镜样式  blur 设置模糊度 值越大越模糊 */
            filter: blur(2px);
        }
        .box li input{
            /* 设置透明度 */
            opacity: 0;
            width: 100px;
            height: 100%;
            transition: .3s;
        }
        .box li::before{
            position: absolute;
            content: '';
            left: 0;
            top: 0;
            width: 100px;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.324);
        }
        .box li input:checked{
            width: 700px;
        }
        .box li:nth-child(1){
            background: url(../../img/作业6/1.jpg) center/cover;
        }
        .box li:nth-child(2){
            background: url(../../img/作业6/2.webp) center/cover;
        }        
        .box li:nth-child(3){
            background: url(../../img/作业6/3.webp) center/cover;
        }
        .box li:nth-child(4){
            background: url(../../img/作业6/4.webp) center/cover;
        }
        /* 大背景 */
        .box li:nth-child(1) .bg{
            background: url(../../img/作业6/1.jpg) center/cover;
        }
        .box li:nth-child(2) .bg{
            background: url(../../img/作业6/2.webp) center/cover;
        }        
        .box li:nth-child(3) .bg{
            background: url(../../img/作业6/3.webp) center/cover;
        }
        .box li:nth-child(4) .bg{
            background: url(../../img/作业6/4.webp) center/cover;
        }
    </style>
</head>
<body>
    <ul class="box">
        <li>
            <input type="radio" name="one" id="">
            <div class="bg"></div>
        </li>
        <li>
            <input checked type="radio" name="one" id="">
            <div class="bg"></div>
        </li>
        <li>
            <input type="radio" name="one" id="">
            <div class="bg"></div>
        </li>
        <li>
            <input type="radio" name="one" id="">
            <div class="bg"></div>
        </li>
    </ul>
</body>
</html>